﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DanhsachtoanTVV.ascx.cs" Inherits="WebUserControl_DanhsachtoanTVV" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>


<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />

 <script type="text/javascript">
     function pageLoad() {
      $("#<%= bt_baocao.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
         setTimeout($.unblockUI, 5000); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 
 <fieldset>
    <legend>Báo cáo toàn bộ TVV</legend>
    <div class="fm-req">
      <label for="DropDownList1">TTPP:</label>
      <asp:DropDownList ID="DropDownList1" runat="server"  Width="200px">
            </asp:DropDownList>
      </div>
      </fieldset>
      <div>
       <asp:Button ID="bt_baocao" runat="server" Text="Báo cáo" 
                onclick="bt_baocao_Click" />
                &nbsp;&nbsp;
            <asp:Button ID="Button1" runat="server" Text="Xuất ra Excel" 
                onclick="Button1_Click" />
      </div>

            <dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" runat="server" 
                ASPxPivotGridID="ASPxPivotGrid1">
            </dxpgw:ASPxPivotGridExporter>
           <br />
        
         <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server" 
            CustomizationFieldsVisible="True" CustomizationFieldsLeft="700" 
            CustomizationFieldsTop="400">
             <Fields>
             <dxwpg:PivotGridField ID="field" Area="RowArea" AreaIndex="0" Caption="Số TT" 
                        FieldName="STT">
                    </dxwpg:PivotGridField>
                 
                 <dxwpg:PivotGridField ID="field1" Area="RowArea" AreaIndex="1" 
                        Caption="Khu vực" FieldName="Region">
                    </dxwpg:PivotGridField>
                <dxwpg:PivotGridField ID="field2" Area="RowArea" AreaIndex="2" Caption="Mã" 
                        FieldName="Salesp_Key">
                    </dxwpg:PivotGridField>
                    
                 <dxwpg:PivotGridField ID="field3" Area="RowArea" AreaIndex="3" Caption="Tên" 
                        FieldName="salesp_name">
                    </dxwpg:PivotGridField>
                    
                    <dxwpg:PivotGridField ID="PivotGridField5" Area="RowArea" AreaIndex="4" Caption="Ngày sinh" 
                        FieldName="BirthDate">
                    </dxwpg:PivotGridField>
                    
                  <dxwpg:PivotGridField ID="field4" Area="RowArea" AreaIndex="5" 
                        Caption="Ngày gia nhập" FieldName="RecDate">
                    </dxwpg:PivotGridField>
                    
                <dxwpg:PivotGridField ID="field5" Area="RowArea" AreaIndex="6" 
                        Caption="Danh Hiệu" FieldName="Description">
                    </dxwpg:PivotGridField>
                    
                 <dxwpg:PivotGridField ID="field6" Area="RowArea" AreaIndex="7" Caption="Mã BUM" 
                        FieldName="MABUM">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field7" Area="RowArea" AreaIndex="8" 
                        Caption="Tên tuyến trên" FieldName="TENBUM">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field8" Area="RowArea" AreaIndex="9" 
                        Caption="Địa chỉ" FieldName="Address">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field9" Area="RowArea" AreaIndex="10" 
                        Caption="Quận/Huyện" FieldName="Town">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field10" Area="RowArea" AreaIndex="11" 
                        Caption="Tỉnh /TP" FieldName="ProvinceName">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field11" Area="RowArea" AreaIndex="12" Caption="ĐT" 
                        FieldName="Tel">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field12" Area="RowArea" AreaIndex="13" 
                        Caption="Di Động" FieldName="Mobile">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field13" Area="RowArea" AreaIndex="14" 
                        Caption="Cấp Bậc" FieldName="capbac">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field14" Area="RowArea" AreaIndex="15" 
                        Caption="Hoạt động/Không" FieldName="Hoatdong">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field15" Area="RowArea" AreaIndex="16" 
                        Caption="Số lượng BA nhóm CN" FieldName="SoBANhomCN">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field16" Area="RowArea" AreaIndex="17" 
                        Caption="Số lượng BA NCN Hoạt động" FieldName="SoBANhomCNAlive">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field17" Area="RowArea" AreaIndex="18" 
                        Caption="Số lượng BA cả Nhóm" FieldName="SoBAToanNhom">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field18" Area="RowArea" AreaIndex="19" 
                        Caption="Số nhánh chuẩn" FieldName="SoNhanhChuan">
                    </dxwpg:PivotGridField>
                    
                 <dxwpg:PivotGridField ID="field19" Area="DataArea" AreaIndex="19" 
                        Caption="Doanh số cá nhân" FieldName="DSCaNhan" CellFormat-FormatString="{0:###,###.###}" 
                     CellFormat-FormatType="Numeric">
                 </dxwpg:PivotGridField>
                  <dxwpg:PivotGridField ID="PivotGridField1" Area="DataArea" AreaIndex="20" 
                        Caption="Doanh số nhóm cá nhân" CellFormat-FormatString="{0:###,###.###}" 
                        CellFormat-FormatType="Numeric"  FieldName="DSNhomCaNhan">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField   ID="PivotGridField2" Area="DataArea" AreaIndex="21" 
                        Caption="Doanh số cả nhóm" 
                       CellFormat-FormatString="{0:###,###.###}"
                         CellFormat-FormatType="Numeric" FieldName="DSToanNhom">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="PivotGridField3" Area="FilterArea" AreaIndex="0">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="PivotGridField4" Area="FilterArea" AreaIndex="1">
                    </dxwpg:PivotGridField>
                
             </Fields>
             <OptionsView ShowColumnGrandTotals="False" ShowColumnHeaders="False" 
                    ShowColumnTotals="False" />
        </dxwpg:ASPxPivotGrid>
       
                
       
